package com.guijq.design.decorator.starbuzz.condiment;

import com.guijq.design.decorator.starbuzz.beverage.Beverage;

/**
 * Created by Gavin on 2017/3/7.
 */
public class CondimentDecorator extends Beverage {

    protected Beverage beverage;

    public CondimentDecorator(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public double cost() {
        return beverage.cost() + price;
    }

    public String getDescription() {
        return beverage.getDescription() + "," + this.description;
    }

}
